package cube.utils.msg;

import java.util.HashMap;
import java.util.Map;

/**
 * 获取配置工具
 * 
 * @author abiao
 */
public abstract class MsgFactory {

    /**
     * 资源绑定
     */
    private static Map<String, MsgUtil> msgs = new HashMap<String, MsgUtil>();

    /**
     * @param bundle 配置文件名字(不包括后缀)
     * @return MsgUtil
     */
    public static MsgUtil bundle(String bundle) {
        if (!msgs.containsKey(bundle)) {
            msgs.put(bundle, new MsgUtil(bundle));
        }
        return msgs.get(bundle);
    }
}
